/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Base for creating a custom VGUI class; remove the functions you don't use.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/



local PANEL = {}

function PANEL:Init()
	//Create controls here
	
	self:SetTitle( " " )
	self:ShowCloseButton( false )
	
	self.OWNTEXT = "No Owner"
	
	local OwnLabel = vgui.Create( "DLabel", self )
		OwnLabel:SetTextColor( color_black )
		OwnLabel:SetText( "Owner: " .. self.OWNTEXT )
		
		self.OwnLabel = OwnLabel
	
end

function PANEL:PerformLayout()
	// Let's make sure we perform the layout of the class this panel is based on here as well.
	
	self.BaseClass.PerformLayout( self )
	
	self.OwnLabel:SizeToContents()
	self.OwnLabel:AlignLeft( 4 )
	self.OwnLabel:AlignTop( 4 )

end

function PANEL:Paint()
	//self.BaseClass.Paint( self )
	
	surface.SetDrawColor( Color( 180, 180, 180, 100 ) )
	surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() )
	
	surface.SetDrawColor( Color( 25, 25, 25, 100 ) )
	surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
end

function PANEL:PaintOver()

	//Paint over self and child elements here.

end

function PANEL:Think()
	//Think stuff here
	
	self.OwnLabel:SetText( "Owner: " .. self.OWNTEXT )
	self.OwnLabel:SizeToContents()
	
	self:SetSize( self.OwnLabel:GetWide() + 8, self.OwnLabel:GetTall() + 8 )
	self:AlignRight( 5 )
	self:AlignTop( ScrH() * 0.3 )

end

function PANEL:OnCursorEntered()

	//Do stuff when the cursor enters the panel

end

function PANEL:OnCursorExited()

	//Do Stuff when the cursor leaves the panel

end

function PANEL:OnMouseWheeled()

	//Do stuff when you wheel the mouse on this panel

end

function PANEL:OnMousePressed()

	//Do stuff when you press the mouse on this panel

end

function PANEL:OnMouseReleased()

	//Do stuff when you release the mouse on this panel

end

function PANEL:OnKeyCodePressed()

	//Do stuff when using keys from the keyboard on this panel. This hook uses the keycode enumerations
	//http://wiki.garrysmod.com/?title=P.OnKeyCodePressed	For more information

end

function PANEL:ActionSignal()

	//This is called on the parent frame when a child VGUI element is used. The key corresponds to what is set by Panel.SetCommand.
	//From the wiki
	
end

function PANEL:OnCursorMoved()

	//From the wiki
	//Called whenever the the mouse is moved within the panel.

end

function PANEL:DoClick()

	//For button type panels, use this. Called when you click the button.

end


//Register syntax - Desired element name, Panel to use, base class of the new element.
vgui.Register( "PPInfo", PANEL, "DFrame" )